home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / Makefile < prev    next >
Makefile  |  1994-07-08  |  4KB  |  116 lines

  1. # Hey Emacs, this Makefile is in -*- makefile -*- mode!
  2. #
  3. # Makefile for Bash.
  4. # If your cpp doesn't like -P, just get rid of it (the -P, not cpp).
  5. # If you wish to use Gcc, then type `make CC=gcc CPPNAME='$(CC) -E''.
  6. # If you wish to use GNU's Make, then change `MAKE'.
  7. # If you don't like the destination, then change `bindir'.
  8. # The file that you most likely want to look at is cpp-Makefile.
  9. #
  10. # If you haven't read README, now might be a good time.
  11.  
  12. # Include some boilerplate Gnu makefile definitions.
  13. prefix = /usr/local
  14. exec_prefix = $(prefix)
  15. bindir = $(exec_prefix)/bin
  16. srcdir = .
  17. VPATH = $(srcdir)
  18.  
  19. # MAKE    = make
  20. RM      = rm -f
  21. SHELL   = /bin/sh
  22. GAWK     = awk
  23. # GAWK     = gawk
  24.  
  25. # Force CPPNAME to be the name of your C preprocesor if Bash can't
  26. # find it.  For instance, `CPPNAME=/usr/libexec/cpp' on 4.4 BSD.
  27. # If all else fails, set CPPNAME=$(CC) -E
  28. CPPNAME =
  29. CPP     = `/bin/sh $(CPPMAGIC) $(GETCPPSYMS) "$(CPPNAME)"` -P
  30.  
  31. CPP_MAKEFILE = $(srcdir)/cpp-Makefile
  32. ANSI_MAKEFILE = ansi-Makefile
  33.  
  34. # CPPFLAGS = $(SYSTEM) $(CPP_DEFINES)
  35. CPPFLAGS = $(CPP_DEFINES) -I. -I$(srcdir)
  36. CPP_ARGS = -DCPP_CC="$(CC)"
  37.  
  38. SUPPORTDIR     = ./support/
  39. SUPPORTSRC     = $(srcdir)/support/
  40.  
  41. MKSYSDEFS      = $(SUPPORTSRC)mksysdefs
  42. CPPMAGIC       = $(SUPPORTSRC)cppmagic
  43. CAT_S          = $(SUPPORTSRC)cat-s
  44. GETCPPSYMS     = $(SUPPORTDIR)getcppsyms
  45. GETCPPSYMS_SRC = $(SUPPORTSRC)getcppsyms.c
  46.  
  47. # Here is a command which compresses runs of multiple blank lines to a
  48. # single blank line.  "cat -s" works for BSD systems, but not for USG
  49. # systems.  You can use an awk script if you like.  If you have too
  50. # much trouble with this, just forget it.  It is for making
  51. # bash-Makefile pretty and readable; something that isn't strictly
  52. # necessary.
  53. # SQUASH_BLANKS = cat -s
  54. #
  55. SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
  56.  
  57. all:    .notified bash-Makefile
  58.     $(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) srcdir=$(srcdir)
  59.  
  60. bash-Makefile: $(CPP_MAKEFILE) Makefile machines.h sysdefs.h config.h
  61.     @-if [ -f ansi-Makefile ]; then \
  62.         echo "cp ansi-Makefile tmp-Makefile.c"; \
  63.         cp ansi-Makefile tmp-Makefile.c; else \
  64.         echo "cp $(CPP_MAKEFILE) tmp-Makefile.c"; \
  65.         cp $(CPP_MAKEFILE) tmp-Makefile.c; \
  66.       fi
  67.     $(RM) $(GETCPPSYMS)
  68.     $(SHELL) $(SUPPORTSRC)mkdirs support
  69.     $(CC) -o $(GETCPPSYMS) $(GETCPPSYMS_SRC)
  70.     rm -f bash-Makefile
  71.     @$(SHELL) -c 'echo $(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c \| $(SQUASH_BLANKS) \> bash-Makefile'
  72.     @$(SHELL) -c '$(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c | $(SQUASH_BLANKS) >bash-Makefile'
  73.     rm -f tmp-Makefile.c
  74.     @test -s bash-Makefile || { rm -f bash-Makefile ; exit 1; }
  75.  
  76. sysdefs.h: $(MKSYSDEFS)
  77.     $(SHELL) $(MKSYSDEFS) -s $(srcdir)
  78.  
  79. # This is also performed by support/mksysdefs, but there's no way to change
  80. # it if cpp-Makefile is changed without changing anything else, since there
  81. # are no dependencies.  This lets you run `make ansi-Makefile'.
  82. ansi-Makefile: $(CPP_MAKEFILE)
  83.     grep -v '/\*\*/' $(CPP_MAKEFILE) > $@
  84.  
  85. # Subsequent lines contain targets that are correctly handled by an
  86. # existing bash-Makefile.
  87.  
  88. install uninstall newversion architecture: bash-Makefile
  89.     $(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) \
  90.         prefix=$(prefix) $@
  91.  
  92. tests DEFINES tags documentation: bash-Makefile directory-frob
  93.     $(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) $@
  94.  
  95. clean distclean realclean: bash-Makefile directory-frob
  96.     rm -f .notified
  97.     $(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) $@
  98.  
  99. directory-frob:
  100.  
  101. .NOEXPORT:
  102.  
  103. .notified:
  104.     @echo ""
  105.     @echo "   You are about to make this version of GNU Bash for"
  106.     @echo "   this architecture for the first time.  If you haven't"
  107.     @echo "   yet read the README file, you may want to do so.  If"
  108.     @echo "   you wish to report a bug in Bash, or in the installation"
  109.     @echo "   procedure, please run the bashbug script and include:"
  110.     @echo ""
  111.     @echo "    * a description of the bug,"
  112.     @echo "    * a recipe for recreating the bug reliably,"
  113.     @echo "    * a fix for the bug if you have one!"
  114.     @echo ""
  115.     @touch .notified
  116.